home *** CD-ROM | disk | FTP | other *** search
/ Laboratorio Interattivo Deagostini / laboratorio interattivo deagostini.bin / swf / 109.swf / scripts / DefineSprite_53 / frame_2 / DoAction.as
Text File  |  2003-01-05  |  2KB  |  59 lines

  1. dimH = popup.scelta1._width;
  2. dimV = popup.scelta1._height;
  3. HSfondo = nScelte * (dimV + 1) + 1;
  4. popup.sfondo._height = HSfondo;
  5. popup.sfondo._width = dimH + 2;
  6. popup.sfondo._x = 0;
  7. popup.sfondo._y = 0;
  8. popup.sinistra._x = 0;
  9. popup.sinistra._y = 0;
  10. popup.sinistra._width = 1;
  11. popup.sinistra._height = HSfondo;
  12. popup.destra._x = dimH + 1;
  13. popup.destra._y = 0;
  14. popup.destra._width = 1;
  15. popup.destra._height = HSfondo;
  16. popup.delimitatore._x = 1;
  17. popup.delimitatore._y = 0;
  18. popup.delimitatore._width = dimH;
  19. var i = 0;
  20. i = 1;
  21. while(nScelte >= i)
  22. {
  23.    nuovoNome = "delimitatore" + i;
  24.    percorso = "popup." + nuovoNome;
  25.    duplicateMovieClip(popup.delimitatore,nuovoNome,16384 + i);
  26.    eval(percorso)._x = 1;
  27.    eval(percorso)._y = i * (dimV + 1);
  28.    i += 1;
  29. }
  30. popup.scelta1._x = 1;
  31. popup.scelta1._y = 1;
  32. popup.scelta1.testo = lScelte[0];
  33. var s = 0;
  34. s = 2;
  35. while(nScelte >= s)
  36. {
  37.    nomeBottone = "scelta" + s;
  38.    pBottone = "popup." + nomeBottone;
  39.    duplicateMovieClip(popup.scelta1,nomeBottone,16384 + (s + 50));
  40.    eval(pBottone)._x = 1;
  41.    eval(pBottone)._y = (s - 1) * (dimV + 1) + 1;
  42.    eval(pBottone).testo = lScelte[s - 1];
  43.    s += 1;
  44. }
  45. bottom = risposta._y + risposta._height - 1 + HSfondo;
  46. BottomPop = bottom + this._y - math.abs(_parent._y);
  47. HBarra = _parent._parent.barratot._height;
  48. YBarra = _parent._parent.barratot._y;
  49. BottomBarra = YBarra + HBarra / 2;
  50. popup._x = -1;
  51. if(BottomBarra < BottomPop)
  52. {
  53.    popup._y = risposta._y - HSfondo;
  54. }
  55. else
  56. {
  57.    popup._y = risposta._y + risposta._height - 2;
  58. }
  59.